/* ================================
   Mars Pay 支付系统样式表
   ================================ */

/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部样式 */
.header {
    text-align: center;
    color: white;
    margin-bottom: 40px;
    padding: 30px 0;
}

.header h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.header .subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
}

.header .btn {
    margin-top: 20px;
}

/* 卡片样式 */
.card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
}

.card h2 {
    margin-bottom: 20px;
    color: #667eea;
    font-size: 1.8rem;
}

/* 商品列表 */
.products {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.product-item {
    border: 2px solid #e8e8e8;
    border-radius: 10px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s ease;
}

.product-item:hover {
    border-color: #667eea;
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.2);
}

.product-item h3 {
    margin-bottom: 10px;
    color: #333;
    font-size: 1.3rem;
}

.product-item .desc {
    color: #666;
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.product-item .price {
    font-size: 2rem;
    color: #ff4d4f;
    font-weight: bold;
    margin-bottom: 20px;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #52c41a;
    color: white;
}

.btn-secondary:hover {
    background: #49aa16;
    transform: translateY(-2px);
}

.btn-default {
    background: #d9d9d9;
    color: #333;
}

.btn-default:hover {
    background: #bfbfbf;
}

.btn-small {
    padding: 8px 15px;
    font-size: 0.9rem;
}

/* 操作按钮 */
.actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/* 订单表格 */
.order-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.order-table th,
.order-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #e8e8e8;
}

.order-table th {
    background: #f5f5f5;
    color: #333;
    font-weight: 600;
}

.order-table tr:hover {
    background: #fafafa;
}

.order-table .price {
    color: #ff4d4f;
    font-weight: bold;
}

/* 徽章 */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
}

.badge-success {
    background: #f6ffed;
    color: #52c41a;
    border: 1px solid #b7eb8f;
}

.badge-info {
    background: #e6f7ff;
    color: #1890ff;
    border: 1px solid #91d5ff;
}

.badge-warning {
    background: #fffbe6;
    color: #faad14;
    border: 1px solid #ffe58f;
}

.badge-danger {
    background: #fff1f0;
    color: #ff4d4f;
    border: 1px solid #ffa39e;
}

.badge-secondary {
    background: #f5f5f5;
    color: #8c8c8c;
    border: 1px solid #d9d9d9;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state p {
    font-size: 1.2rem;
    margin-bottom: 20px;
}

/* 支付页面 */
.payment-card {
    max-width: 600px;
    margin: 0 auto;
}

.payment-info {
    background: #f5f5f5;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
}

.payment-info h3 {
    margin-bottom: 15px;
    color: #333;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #e8e8e8;
}

.info-row:last-child {
    border-bottom: none;
}

.info-row .label {
    color: #666;
}

.info-row .value {
    font-weight: 600;
    color: #333;
}

.qrcode-container {
    text-align: center;
    padding: 30px 0;
}

.qrcode-container h3 {
    margin-bottom: 20px;
    color: #333;
}

.qrcode {
    max-width: 300px;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    padding: 10px;
    background: white;
}

.tips {
    margin-top: 20px;
    color: #faad14;
    font-size: 1rem;
}

.tips .icon {
    font-size: 1.2rem;
}

.payment-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

.payment-status {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
}

.payment-status.info {
    background: #e6f7ff;
    color: #1890ff;
    border: 1px solid #91d5ff;
}

.payment-status.success {
    background: #f6ffed;
    color: #52c41a;
    border: 1px solid #b7eb8f;
}

.payment-status.error {
    background: #fff1f0;
    color: #ff4d4f;
    border: 1px solid #ffa39e;
}

/* 成功页面 */
.success-card {
    text-align: center;
    max-width: 500px;
    margin: 100px auto;
    padding: 60px 30px;
}

.success-icon {
    margin-bottom: 30px;
    animation: scaleIn 0.5s ease;
}

.success-title {
    font-size: 2.5rem;
    color: #52c41a;
    margin-bottom: 10px;
}

.success-subtitle {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 40px;
}

.success-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

/* 错误页面 */
.error-card {
    text-align: center;
    max-width: 500px;
    margin: 100px auto;
    padding: 60px 30px;
}

.error-icon {
    margin-bottom: 30px;
    animation: shake 0.5s ease;
}

.error-title {
    font-size: 2.5rem;
    color: #ff4d4f;
    margin-bottom: 10px;
}

.error-message {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 40px;
}

.error-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 0;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.3s ease;
}

.modal-header {
    padding: 20px 30px;
    border-bottom: 1px solid #e8e8e8;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: #333;
}

.close {
    color: #999;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: #333;
}

.modal-body {
    padding: 30px;
}

#orderInfo {
    white-space: pre-line;
    background: #f5f5f5;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 1rem;
    color: #333;
}

.payment-methods {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.payment-method {
    border: 2px solid #e8e8e8;
    border-radius: 10px;
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.payment-method:hover {
    border-color: #667eea;
    background: #f5f5ff;
    transform: translateY(-3px);
}

.payment-method img {
    width: 60px;
    height: 60px;
    margin-bottom: 10px;
}

.payment-method span {
    display: block;
    font-size: 1.1rem;
    font-weight: 500;
    color: #333;
}

/* 页脚 */
.footer {
    text-align: center;
    color: white;
    padding: 20px 0;
    margin-top: 50px;
}

.footer p {
    opacity: 0.8;
}

/* 动画 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header h1 {
        font-size: 2rem;
    }

    .card {
        padding: 20px;
    }

    .products {
        grid-template-columns: 1fr;
    }

    .order-table {
        font-size: 0.9rem;
    }

    .order-table th,
    .order-table td {
        padding: 10px;
    }

    .payment-methods {
        grid-template-columns: 1fr;
    }

    .actions,
    .payment-actions,
    .success-actions,
    .error-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

